import request from "../util/request";

//获取所有角色
export const getRoleApi = (query) => request('/role', {
    
    query: {
            pageSize: 100,
            pageNum:1,
        ...query,
    }
})
//获取角色菜单
export const RoleMenuApi = (query) => request(`/role/menu/${query}`, {
    
    
})

//获取菜单所有权限
export const getallMenuApi = (query) => request(`/menu`, {
    
    
})

//新增角色
export const CreateRoleApi = (body) => request(`/role`, {
    method:'post',
    body
    
    
})
//删除角色
export const delRoleApi = (query) => request(`/role/${query}`, {
    method:'delete',

    
})
//修改角色信息
export const changeRoleApi = (body) => request(`/role`, {
    method:'put',
    body
    
})
//回显菜单
export const getRoleMenuApi = (body) => request(`/menu`, {
    
        body
})